---
layout: m1x_rest
title: Products
---



<ul class="introduction-menu">
    <li><a href='#RESTAPI-Resource-Products-RESTAPI-Products'>REST API: Products</a>
    <ul>
        <li><a href='#RESTAPI-Resource-Products-URI--products'>URI: /products</a>
        <ul>
            <li><a href='#RESTAPI-Resource-Products-HTTPMethod-GET-products'>HTTP Method: GET /products</a></li>
            <li><a href='#RESTAPI-Resource-Products-HTTPMethod-GET-products-categoryid--id'>HTTP Method: GET /products/category_id=:id</a></li>
            <li><a href='#RESTAPI-Resource-Products-HTTPMethod-POST-products'>HTTP Method: POST /products</a></li>
        </ul>
        </li>
        <li><a href='#RESTAPI-Resource-Products-URI--products--id'>URI: /products/:id</a>
        <ul>
            <li><a href='#RESTAPI-Resource-Products-HTTPMethod-GET-products--id'>HTTP Method: GET /products/:id</a></li>
            <li><a href='#RESTAPI-Resource-Products-HTTPMethod-PUT-products--id'>HTTP Method: PUT /products/:id</a></li>
            <li><a href='#RESTAPI-Resource-Products-HTTPMethod-DELETE-products--id'>HTTP Method: DELETE /products/:id</a></li>
        </ul>
        </li>
        <li><a href='#RESTAPI-Resource-Products-PossibleHTTPStatusCodes'>Possible HTTP Status Codes</a></li>
    </ul>
    </li>
</ul>


<h3><a name="RESTAPI-Resource-Products-RESTAPI-Products"></a>REST API: Products</h3>


<h4><a name="RESTAPI-Resource-Products-URI--products"></a>URI: /products</h4>

<p>Allows you to retrieve the list of all products with detailed information.</p>

<p><b>URL Structure</b>: <a href="http://magentohost/api/rest/products">http://magentohost/api/rest/products</a><br/>
<b>Version</b>: 1</p>


<h5><a name="RESTAPI-Resource-Products-HTTPMethod-GET-products"></a>HTTP Method: GET /products</h5>

<p><b>描述</b>: Allows you to retrieve the list of all products with detailed information.<br/>
<b>Notes</b>: The list of attributes that will be returned in the response is configured in the Magento Admin Panel. The list of attributes differs for each type of user.</p>


<p><b>Authentication</b>: Admin<br/>
<b>Default Format</b>: XML<br/>
<b>Parameters</b>:<br/>
<em>No Parameters</em></p>



<div class='panelMacro'><table class='infoMacro'><tr><td>GET <a href="http://magentohost/api/rest/products">http://magentohost/api/rest/products</a></td></tr></table></div>

<p><b>Response Example: XML</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">&lt;?xml version="1.0"?&gt;
&lt;magento_api&gt;
  &lt;data_item&gt;
    &lt;entity_id&gt;1&lt;/entity_id&gt;
    &lt;type_id&gt;simple&lt;/type_id&gt;
    &lt;sku&gt;dress_test&lt;/sku&gt;
    &lt;status&gt;1&lt;/status&gt;
    &lt;visibility&gt;4&lt;/visibility&gt;
    &lt;tax_class_id&gt;2&lt;/tax_class_id&gt;
    &lt;weight&gt;1.0000&lt;/weight&gt;
    &lt;price&gt;1500.0000&lt;/price&gt;
    &lt;special_price&gt;1000.0000&lt;/special_price&gt;
    &lt;name&gt;Wedding dress&lt;/name&gt;
    &lt;url_key&gt;dress&lt;/url_key&gt;
    &lt;country_of_manufacture&gt;AO&lt;/country_of_manufacture&gt;
    &lt;msrp_display_actual_price_type&gt;2&lt;/msrp_display_actual_price_type&gt;
    &lt;gift_message_available&gt;1&lt;/gift_message_available&gt;
    &lt;news_from_date&gt;2012-03-21 00:00:00&lt;/news_from_date&gt;
    &lt;news_to_date&gt;2012-03-24 00:00:00&lt;/news_to_date&gt;
    &lt;special_from_date&gt;2012-03-21 00:00:00&lt;/special_from_date&gt;
    &lt;special_to_date&gt;2012-03-24 00:00:00&lt;/special_to_date&gt;
    &lt;description&gt;White wedding dress&lt;/description&gt;
  &lt;/data_item&gt;
  &lt;data_item&gt;
    &lt;entity_id&gt;2&lt;/entity_id&gt;
    &lt;type_id&gt;simple&lt;/type_id&gt;
    &lt;sku&gt;black_sunglasses&lt;/sku&gt;
    &lt;status&gt;1&lt;/status&gt;
    &lt;visibility&gt;4&lt;/visibility&gt;
    &lt;tax_class_id&gt;2&lt;/tax_class_id&gt;
    &lt;weight&gt;0.2000&lt;/weight&gt;
    &lt;price&gt;500.0000&lt;/price&gt;
    &lt;special_price&gt;300.0000&lt;/special_price&gt;
    &lt;name&gt;Sunglasses&lt;/name&gt;
    &lt;url_key&gt;sunglasses&lt;/url_key&gt;
    &lt;country_of_manufacture&gt;AR&lt;/country_of_manufacture&gt;
    &lt;msrp_display_actual_price_type&gt;2&lt;/msrp_display_actual_price_type&gt;
    &lt;gift_message_available&gt;&lt;/gift_message_available&gt;
    &lt;news_from_date&gt;&lt;/news_from_date&gt;
    &lt;news_to_date&gt;&lt;/news_to_date&gt;
    &lt;special_from_date&gt;2012-03-21 00:00:00&lt;/special_from_date&gt;
    &lt;special_to_date&gt;2012-03-24 00:00:00&lt;/special_to_date&gt;
    &lt;description&gt;Black sunglasses&lt;/description&gt;
  &lt;/data_item&gt;
&lt;/magento_api&gt;</pre>
		</div>
</div></div>
</div></div>

<p><b>Response Example: JSON</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">{"1":{"entity_id":"1","type_id":"simple","sku":"dress_test","status":"1","visibility":"4","tax_class_id":"2","weight":"1.0000","price":"1500.0000","special_price":"1000.0000","name":"Wedding dress","url_key":"dress","country_of_manufacture":"AO","msrp_display_actual_price_type":"2","gift_message_available":"1","news_from_date":"2012-03-21 00:00:00","news_to_date":"2012-03-24 00:00:00","special_from_date":"2012-03-21 00:00:00","special_to_date":"2012-03-24 00:00:00","description":"White wedding dress"},"2":{"entity_id":"2","type_id":"simple","sku":"black_sunglasses","status":"1","visibility":"4","tax_class_id":"2","weight":"0.2000","price":"500.0000","special_price":"300.0000","name":"Sunglasses","url_key":"sunglasses","country_of_manufacture":"AR","msrp_display_actual_price_type":"2","gift_message_available":null,"news_from_date":null,"news_to_date":null,"special_from_date":"2012-03-21 00:00:00","special_to_date":"2012-03-24 00:00:00","description":"Black sunglasses"}}</pre>
		</div>
</div></div>
</div></div>



<p><b>Authentication</b>: Customer, Guest<br/>
<b>Default Format</b>: XML<br/>
<b>Parameters</b>:<br/>
<em>No Parameters</em></p>



<div class='panelMacro'><table class='infoMacro'><tr><td>GET <a href="http://magentohost/api/rest/products">http://magentohost/api/rest/products</a></td></tr></table></div>

<p><b>Response Example: XML</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">&lt;?xml version="1.0"?&gt;
&lt;magento_api&gt;
  &lt;data_item&gt;
    &lt;entity_id&gt;1&lt;/entity_id&gt;
    &lt;type_id&gt;simple&lt;/type_id&gt;
    &lt;sku&gt;dress_test&lt;/sku&gt;
    &lt;description&gt;White wedding dress&lt;/description&gt;
    &lt;short_description&gt;dress&lt;/short_description&gt;
    &lt;meta_keyword&gt;white, dress&lt;/meta_keyword&gt;
    &lt;name&gt;Wedding dress&lt;/name&gt;
    &lt;meta_title&gt;dress&lt;/meta_title&gt;
    &lt;meta_description&gt;A nice wedding dress&lt;/meta_description&gt;
    &lt;regular_price_with_tax&gt;1500&lt;/regular_price_with_tax&gt;
    &lt;regular_price_without_tax&gt;1500&lt;/regular_price_without_tax&gt;
    &lt;final_price_with_tax&gt;1000&lt;/final_price_with_tax&gt;
    &lt;final_price_without_tax&gt;1000&lt;/final_price_without_tax&gt;
    &lt;is_saleable&gt;1&lt;/is_saleable&gt;
    &lt;image_url&gt;http://magentohost/media/catalog/product/cache/0/image/9df78eab33525d08d6e5fb8d27136e95/1/2/wedding_dress.jpg&lt;/image_url&gt;
  &lt;/data_item&gt;
  &lt;data_item&gt;
    &lt;entity_id&gt;2&lt;/entity_id&gt;
    &lt;type_id&gt;simple&lt;/type_id&gt;
    &lt;sku&gt;black_sunglasses&lt;/sku&gt;
    &lt;description&gt;Black sunglasses&lt;/description&gt;
    &lt;short_description&gt;Black sunglasses&lt;/short_description&gt;
    &lt;meta_keyword&gt;sunglasses, black&lt;/meta_keyword&gt;
    &lt;name&gt;Sunglasses&lt;/name&gt;
    &lt;meta_title&gt;sunglasses&lt;/meta_title&gt;
    &lt;meta_description&gt;black sunglasses&lt;/meta_description&gt;
    &lt;regular_price_with_tax&gt;500&lt;/regular_price_with_tax&gt;
    &lt;regular_price_without_tax&gt;500&lt;/regular_price_without_tax&gt;
    &lt;final_price_with_tax&gt;300&lt;/final_price_with_tax&gt;
    &lt;final_price_without_tax&gt;300&lt;/final_price_without_tax&gt;
    &lt;is_saleable&gt;1&lt;/is_saleable&gt;
    &lt;image_url&gt;http://magentohost/media/catalog/product/cache/0/image/9df78eab33525d08d6e5fb8d27136e95/a/l/sunglasses-1.jpg&lt;/image_url&gt;
  &lt;/data_item&gt;
&lt;/magento_api&gt;</pre>
		</div>
</div></div>
</div></div>

<p><b>Response Example: JSON</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">{"1":{"entity_id":"1","type_id":"simple","sku":"dress_test","description":"White wedding dress","short_description":"dress","meta_keyword":"white, dress","name":"Wedding dress","meta_title":"dress","meta_description":"A nice wedding dress","regular_price_with_tax":1500,"regular_price_without_tax":1500,"final_price_with_tax":1000,"final_price_without_tax":1000,"is_saleable":"1","image_url":"http:\/\/magentohost\/media\/catalog\/product\/cache\/0\/image\/9df78eab33525d08d6e5fb8d27136e95\/1\/2\/wedding_dress.jpg"},"2":{"entity_id":"2","type_id":"simple","sku":"black_sunglasses","description":"Black sunglasses","short_description":"Black sunglasses","meta_keyword":"sunglasses, black","name":"Sunglasses","meta_title":"sunglasses","meta_description":"black sunglasses","regular_price_with_tax":500,"regular_price_without_tax":500,"final_price_with_tax":300,"final_price_without_tax":300,"is_saleable":"1","image_url":"http:\/\/magentohost\/media\/catalog\/product\/cache\/0\/image\/9df78eab33525d08d6e5fb8d27136e95\/a\/l\/sunglasses-1.jpg"}}</pre>
		</div>
</div></div>
</div></div>


<h5><a name="RESTAPI-Resource-Products-HTTPMethod-GET-products-categoryid--id"></a>HTTP Method: GET /products/category_id=:id</h5>

<p><b>描述</b>: Allows you to retrieve the list of products of a specified category. These products will be returned in the product position ascending order. </p>

<p>In the following example, product with ID=4 has position equal to 7 and the product with ID=3 has position equal to 1. The list of products, therefore, is sorted by the product position in the category.</p>

<div class='panelMacro'><table class='infoMacro'><tr><td>GET <a href="http://magentohost/api/rest/products?category_id=5">http://magentohost/api/rest/products?category_id=5</a></td></tr></table></div>

<p><b>Response Example: XML</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">&lt;?xml version="1.0"?&gt;
&lt;magento_api&gt;
  &lt;data_item&gt;
    &lt;entity_id&gt;4&lt;/entity_id&gt;
    &lt;attribute_set_id&gt;4&lt;/attribute_set_id&gt;
    &lt;type_id&gt;simple&lt;/type_id&gt;
    &lt;tax_class_id&gt;2&lt;/tax_class_id&gt;
    &lt;weight&gt;1.0000&lt;/weight&gt;
    &lt;price&gt;329.9900&lt;/price&gt;
  &lt;/data_item&gt;
  &lt;data_item&gt;
    &lt;entity_id&gt;3&lt;/entity_id&gt;
    &lt;attribute_set_id&gt;4&lt;/attribute_set_id&gt;
    &lt;type_id&gt;simple&lt;/type_id&gt;
    &lt;tax_class_id&gt;2&lt;/tax_class_id&gt;
    &lt;weight&gt;1.0000&lt;/weight&gt;
    &lt;price&gt;550.0000&lt;/price&gt;
  &lt;/data_item&gt;
&lt;/magento_api&gt;</pre>
		</div>
</div></div>
</div></div>



<h5><a name="RESTAPI-Resource-Products-HTTPMethod-POST-products"></a>HTTP Method: POST /products</h5>

<p><b>描述</b>: Allows you to create a new simple product.</p>

<p><b>Authentication</b>: Admin<br/>
<b>Default Format</b>: JSON<br/>
<b>Parameters</b>:&nbsp;</p>

<table><tbody>
<tr>
<th> Name </th>
<th> Description </th>
<th> Required </th>
<th> Type </th>
<th> Example Value </th>
</tr>
<tr>
<td> type_id </td>
<td> Product type. Can have the "simple" value. </td>
<td> required </td>
<td> string </td>
<td> simple </td>
</tr>
<tr>
<td> attribute_set_id </td>
<td> Attribute set for the product. </td>
<td> required </td>
<td> int </td>
<td> 4 </td>
</tr>
<tr>
<td> sku </td>
<td> Product SKU </td>
<td> required </td>
<td> string </td>
<td> new_product </td>
</tr>
<tr>
<td> name </td>
<td> Product name </td>
<td> required <br class="atl-forced-newline" /> </td>
<td> string </td>
<td> New product </td>
</tr>
<tr>
<td> meta_title </td>
<td> Product meta title </td>
<td> optional </td>
<td> string </td>
<td> new product </td>
</tr>
<tr>
<td> meta_description <br class="atl-forced-newline" /> </td>
<td> Product meta description </td>
<td> optional </td>
<td> string </td>
<td> This is a new product </td>
</tr>
<tr>
<td> url_key <br class="atl-forced-newline" /> </td>
<td> A friendly URL path for the product </td>
<td> optional </td>
<td> string </td>
<td> new-product </td>
</tr>
<tr>
<td> custom_design <br class="atl-forced-newline" /> </td>
<td> Custom design applied for the product page </td>
<td> optional </td>
<td> string </td>
<td> enterprise/default </td>
</tr>
<tr>
<td> page_layout <br class="atl-forced-newline" /> </td>
<td> Page template that can be applied to the product page </td>
<td> optional </td>
<td> string </td>
<td> one_column </td>
</tr>
<tr>
<td> options_container <br class="atl-forced-newline" /> </td>
<td> Defines how the custom options for the product will be displayed. Can have the following values: Block after Info Column or Product Info Column </td>
<td> optional </td>
<td> string </td>
<td> container2 </td>
</tr>
<tr>
<td> country_of_manufacture <br class="atl-forced-newline" /> </td>
<td> Product country of manufacture </td>
<td> optional </td>
<td> string </td>
<td> AD </td>
</tr>
<tr>
<td> msrp_enabled <br class="atl-forced-newline" /> </td>
<td> The Apply MAP option. Defines whether the price in the catalog in the frontend is substituted with a Click for price link </td>
<td> optional </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> msrp_display_actual_price_type <br class="atl-forced-newline" /> </td>
<td> Defines how the price will be displayed in the frontend. Can have the following values: In Cart, Before Order Confirmation, and On Gesture </td>
<td> optional </td>
<td> int </td>
<td> 2 </td>
</tr>
<tr>
<td> gift_message_available <br class="atl-forced-newline" /> </td>
<td> Defines whether the gift message is available for the product </td>
<td> optional </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> price </td>
<td> Product price </td>
<td> required <br class="atl-forced-newline" /> </td>
<td> string </td>
<td> 2000 </td>
</tr>
<tr>
<td> special_price <br class="atl-forced-newline" /> </td>
<td> Product special price </td>
<td> optional </td>
<td> string </td>
<td> 150 </td>
</tr>
<tr>
<td> weight </td>
<td> Product weight </td>
<td> required <br class="atl-forced-newline" /> </td>
<td> string </td>
<td> 0.5 </td>
</tr>
<tr>
<td> msrp <br class="atl-forced-newline" /> </td>
<td> The Manufacturer's Suggested Retail Price option. The price that a manufacturer suggests to sell the product at </td>
<td> optional </td>
<td> string </td>
<td> 140 </td>
</tr>
<tr>
<td> status </td>
<td> Product status. Can have the following values: 1&#45; Enabled, 2 - Disabled. </td>
<td> required <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> visibility </td>
<td> Product visibility. Can have the following values: 1 - Not Visible Individually, 2 - Catalog, 3 - Search, 4 - Catalog, Search. </td>
<td> required <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 4 </td>
</tr>
<tr>
<td> enable_googlecheckout <br class="atl-forced-newline" /> </td>
<td> Defines whether the product can be purchased with the help of the Google Checkout payment service. Can have the following values: Yes and No </td>
<td> optional </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> tax_class_id </td>
<td> Product tax class. Can have the following values: 0 - None, 2 - taxable Goods, 4 - Shipping, 等., depending on created tax classes. </td>
<td> required <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 7 </td>
</tr>
<tr>
<td> description </td>
<td> Product description. </td>
<td> required <br class="atl-forced-newline" /> </td>
<td> string </td>
<td> This is a new product. </td>
</tr>
<tr>
<td> short_description </td>
<td> Product short description. </td>
<td> required <br class="atl-forced-newline" /> </td>
<td> string </td>
<td> A new product. </td>
</tr>
<tr>
<td> meta_keyword <br class="atl-forced-newline" /> </td>
<td> Product meta keywords </td>
<td> optional </td>
<td> string </td>
<td> new </td>
</tr>
<tr>
<td> custom_layout_update <br class="atl-forced-newline" /> </td>
<td> An XML block to alter the page layout </td>
<td> optional </td>
<td> string </td>
<td> XML body </td>
</tr>
<tr>
<td> special_from_date <br class="atl-forced-newline" /> </td>
<td> Date starting from which the special price will be applied to the product </td>
<td> optional </td>
<td> string </td>
<td> 2012-03-15 00:00:00 </td>
</tr>
<tr>
<td> special_to_date <br class="atl-forced-newline" /> </td>
<td> Date till which the special price will be applied to the product </td>
<td> optional </td>
<td> string </td>
<td> 2012-03-15 00:00:00 </td>
</tr>
<tr>
<td> news_from_date <br class="atl-forced-newline" /> </td>
<td> Date starting from which the product is promoted as a new product </td>
<td> optional </td>
<td> string </td>
<td> 2012-03-15 00:00:00 </td>
</tr>
<tr>
<td> news_to_date <br class="atl-forced-newline" /> </td>
<td> Date till which the product is promoted as a new product </td>
<td> optional </td>
<td> string </td>
<td> 2012-03-15 00:00:00 </td>
</tr>
<tr>
<td> custom_design_from <br class="atl-forced-newline" /> </td>
<td> Date starting from which the custom design will be applied to the product page </td>
<td> optional </td>
<td> string </td>
<td> 2012-03-15 00:00:00 </td>
</tr>
<tr>
<td> custom_design_to <br class="atl-forced-newline" /> </td>
<td> Date till which the custom design will be applied to the product page </td>
<td> optional </td>
<td> string </td>
<td> 2012-03-15 00:00:00 </td>
</tr>
<tr>
<td> group_price <br class="atl-forced-newline" /> </td>
<td> Product group price </td>
<td> optional </td>
<td> array </td>
<td> array of group price </td>
</tr>
<tr>
<td> tier_price <br class="atl-forced-newline" /> </td>
<td> Product tier price </td>
<td> optional </td>
<td> array </td>
<td> array of tier price </td>
</tr>
<tr>
<td> stock_data <br class="atl-forced-newline" /> </td>
<td> Product inventory data </td>
<td> optional </td>
<td> array </td>
<td> array of stock data </td>
</tr>
</tbody></table>


<p>Array of <b>Group Price</b> attributes is as follows:</p>

<table><tbody>
<tr>
<th> Name </th>
<th> Description </th>
<th> Required </th>
<th> Type </th>
<th> Example Value </th>
</tr>
<tr>
<td> website_id </td>
<td> Website ID </td>
<td> optional </td>
<td> int </td>
<td> 0 </td>
</tr>
<tr>
<td> cust_group </td>
<td> Customer group </td>
<td> optional </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> price <br class="atl-forced-newline" /> </td>
<td> Group price </td>
<td> optional </td>
<td> string </td>
<td> 140 </td>
</tr>
</tbody></table>


<p>Array of <b>Tier Price</b> attributes is as follows:</p>

<table><tbody>
<tr>
<th> Name </th>
<th> Description </th>
<th> Required </th>
<th> Type </th>
<th> Example Value </th>
</tr>
<tr>
<td> website_id </td>
<td> Website ID </td>
<td> optional </td>
<td> int </td>
<td> 0 </td>
</tr>
<tr>
<td> cust_group </td>
<td> Customer group </td>
<td> optional </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> price </td>
<td> Tier price </td>
<td> optional </td>
<td> string </td>
<td> 140 </td>
</tr>
<tr>
<td> price_qty </td>
<td> Price quantity </td>
<td> optional </td>
<td> string </td>
<td> 10 </td>
</tr>
</tbody></table>


<p>Array of <b>Stock Data</b> attributes is as follows:</p>

<table><tbody>
<tr>
<th> Name </th>
<th> Description </th>
<th> Required </th>
<th> Type </th>
<th> Example Value </th>
</tr>
<tr>
<td> qty </td>
<td> Quantity of stock items for the current product </td>
<td> optional </td>
<td> string </td>
<td> 99 </td>
</tr>
<tr>
<td> min_qty </td>
<td> Quantity for stock items to become out of stock </td>
<td> optional </td>
<td> string </td>
<td> 5 </td>
</tr>
<tr>
<td> use_config_min_qty </td>
<td> Choose whether the Config settings will be applied for the Qty for Item's Status to Become Out of Stock option </td>
<td> optional </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> is_qty_decimal </td>
<td> Choose whether the product can be sold using decimals (e.g., you can buy 2.5 product) </td>
<td> optional </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> backorders <br class="atl-forced-newline" /> </td>
<td> Defines whether the customer can place the order for products that are out of stock at the moment. <br class="atl-forced-newline" /> </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 0 </td>
</tr>
<tr>
<td> use_config_backorders <br class="atl-forced-newline" /> </td>
<td> Choose whether the Config settings will be applied for the Backorders option </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> min_sale_qty <br class="atl-forced-newline" /> </td>
<td> Minimum number of items in the shopping cart to be sold <br class="atl-forced-newline" /> </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> string </td>
<td> 10 </td>
</tr>
<tr>
<td> use_config_min_sale_qty <br class="atl-forced-newline" /> </td>
<td> Choose whether the Config settings will be applied for the Minimum Qty Allowed in Shopping Cart option </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> max_sale_qty <br class="atl-forced-newline" /> </td>
<td> Maximum number of items in the shopping cart to be sold <br class="atl-forced-newline" /> </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> string </td>
<td> 50 </td>
</tr>
<tr>
<td> use_config_max_sale_qty <br class="atl-forced-newline" /> </td>
<td> Choose whether the Config settings will be applied for the Maximum Qty Allowed in Shopping Cart option </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> is_in_stock <br class="atl-forced-newline" /> </td>
<td> Defines whether the product is available for selling. </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> notify_stock_qty <br class="atl-forced-newline" /> </td>
<td> The number of inventory items below which the customer will be notified </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> string </td>
<td> 5 </td>
</tr>
<tr>
<td> use_config_notify_stock_qty <br class="atl-forced-newline" /> </td>
<td> Choose whether the Config settings will be applied for the Notify for Quantity Below option </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> manage_stock <br class="atl-forced-newline" /> </td>
<td> Choose whether to view and specify the product quantity and availability and whether the product is in stock management. </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> use_config_manage_stock <br class="atl-forced-newline" /> </td>
<td> Choose whether the Config settings will be applied for the Manage Stock option </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> use_config_qty_increments <br class="atl-forced-newline" /> </td>
<td> Choose whether the Config settings will be applied for the Qty Increments option </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> qty_increments <br class="atl-forced-newline" /> </td>
<td> The product quantity increment value </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> string </td>
<td> 3 </td>
</tr>
<tr>
<td> use_config_enable_qty_inc <br class="atl-forced-newline" /> </td>
<td> Choose whether the Config settings will be applied for the Enable Qty Increments option </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 1 </td>
</tr>
<tr>
<td> enable_qty_increments <br class="atl-forced-newline" /> </td>
<td> Defines whether the customer can add products only in increments to the shopping cart </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 0 </td>
</tr>
<tr>
<td> is_decimal_divided <br class="atl-forced-newline" /> </td>
<td> Defines whether the stock items can be divided into multiple boxes for shipping </td>
<td> optional <br class="atl-forced-newline" /> </td>
<td> int </td>
<td> 0 </td>
</tr>
</tbody></table>




<div class='panelMacro'><table class='infoMacro'><tr><td>POST <a href="http://magentohost/api/rest/products">http://magentohost/api/rest/products</a></td></tr></table></div>

<p><b>Request Example: JSON</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">{
  "custom_design" : "default/blank",
  "custom_design_from" : "02/16/2012",
  "custom_design_to" : "05/01/2012",
  "description" : "Test description",
  "gift_message_available" : 1,
  "meta_description" : "Test meta",
  "meta_keyword" : "Test keyword",
  "meta_title" : "Test title",
  "msrp" : 11.015000000000001,
  "msrp_display_actual_price_type" : 1,
  "msrp_enabled" : 1,
  "name" : "Test",
  "news_from_date" : "02/16/2012",
  "news_to_date" : "16.02.2012",
  "options_container" : "container1",
  "page_layout" : "one_column",
  "price" : 25.5,
  "attribute_set_id" : "4",
  "short_description" : "Test short description",
  "sku" : "simple4f5490f31959f",
  "special_from_date" : "02/16/2012",
  "special_price" : 11.199999999999999,
  "special_to_date" : "03/17/2012",
  "status" : 1,
  "stock_data" : { "backorders" : 1,
      "enable_qty_increments" : 0,
      "is_in_stock" : 0,
      "is_qty_decimal" : 0,
      "manage_stock" : 1,
      "max_sale_qty" : 1,
      "min_qty" : 1.5600000000000001,
      "min_sale_qty" : 1,
      "notify_stock_qty" : -50.990000000000002,
      "qty" : 1,
      "use_config_manage_stock" : 1,
      "use_config_min_qty" : 1,
      "use_config_min_sale_qty": 1,
      "use_config_max_sale_qty" : 1,
      "use_config_backorders": 1,
      "use_config_enable_qty_inc":1,
      "use_config_notify_stock_qty":1 },
  "tax_class_id" : "2",
  "type_id" : "simple",
  "use_config_gift_message_available" : 0,
  "visibility" : "4",
  "weight" : 125
}</pre>
		</div>
</div></div>
</div></div>

<p><b>Request Example: XML</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">&lt;?xml version="1.0"?&gt;
&lt;magento_api&gt;
  &lt;attribute_set_id&gt;4&lt;/attribute_set_id&gt;
  &lt;type_id&gt;simple&lt;/type_id&gt;
  &lt;sku&gt;test_dress&lt;/sku&gt;
  &lt;name&gt;Test_dress&lt;/name&gt;
  &lt;country_of_manufacture&gt;AD&lt;/country_of_manufacture&gt;
  &lt;price&gt;2000.0000&lt;/price&gt;
  &lt;special_price&gt;1500.0000&lt;/special_price&gt;
  &lt;weight&gt;0.5000&lt;/weight&gt;
  &lt;status&gt;1&lt;/status&gt;
  &lt;visibility&gt;4&lt;/visibility&gt;
  &lt;tax_class_id&gt;7&lt;/tax_class_id&gt;
  &lt;description&gt;dress&lt;/description&gt;
  &lt;short_description&gt;Wedding dress&lt;/short_description&gt;
&lt;/magento_api&gt;</pre>
		</div>
</div></div>
</div></div>



<h4><a name="RESTAPI-Resource-Products-URI--products--id"></a>URI: /products/:id</h4>

<p>Allows you to retrieve, update, and delete a specified product in Magento.</p>

<p><b>URL Structure</b>: <a href="http://magentohost/api/rest/products/:id">http://magentohost/api/rest/products/:id</a><br/>
<b>Version</b>: 1</p>

<h5><a name="RESTAPI-Resource-Products-HTTPMethod-GET-products--id"></a>HTTP Method: GET /products/:id</h5>

<p><b>描述</b>: Allows you to retrieve information on a required simple product.<br/>
<b>Notes</b>: The list of attributes that will be returned in the response is configured in the Magento Admin Panel. The list of attributes differs for each type of user.</p>


<p><b>Authentication</b>: Admin<br/>
<b>Default Format</b>: XML<br/>
<b>Parameters</b>:<br/>
<em>No Parameters</em></p>


<div class='panelMacro'><table class='infoMacro'><tr><td>GET <a href="http://magentohost/api/rest/products/8">http://magentohost/api/rest/products/8</a></td></tr></table></div>


<p><b>Response Example: XML</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">&lt;?xml version="1.0"?&gt;
&lt;magento_api&gt;
  &lt;entity_id&gt;8&lt;/entity_id&gt;
  &lt;attribute_set_id&gt;4&lt;/attribute_set_id&gt;
  &lt;type_id&gt;simple&lt;/type_id&gt;
  &lt;sku&gt;dress&lt;/sku&gt;
  &lt;name&gt;Dress&lt;/name&gt;
  &lt;url_key&gt;my-new-dress&lt;/url_key&gt;
  &lt;country_of_manufacture&gt;AD&lt;/country_of_manufacture&gt;
  &lt;msrp_display_actual_price_type&gt;2&lt;/msrp_display_actual_price_type&gt;
  &lt;gift_message_available&gt;1&lt;/gift_message_available&gt;
  &lt;price&gt;2000.0000&lt;/price&gt;
  &lt;weight&gt;0.5000&lt;/weight&gt;
  &lt;status&gt;1&lt;/status&gt;
  &lt;visibility&gt;4&lt;/visibility&gt;
  &lt;tax_class_id&gt;7&lt;/tax_class_id&gt;
  &lt;description&gt;dress&lt;/description&gt;
  &lt;group_price&gt;
    &lt;data_item&gt;
      &lt;website_id&gt;0&lt;/website_id&gt;
      &lt;cust_group&gt;1&lt;/cust_group&gt;
      &lt;price&gt;1400.0000&lt;/price&gt;
    &lt;/data_item&gt;
  &lt;/group_price&gt;
  &lt;tier_price&gt;
    &lt;data_item&gt;
      &lt;website_id&gt;0&lt;/website_id&gt;
      &lt;cust_group&gt;1&lt;/cust_group&gt;
      &lt;price&gt;1300.0000&lt;/price&gt;
      &lt;price_qty&gt;1.0000&lt;/price_qty&gt;
    &lt;/data_item&gt;
  &lt;/tier_price&gt;
  &lt;stock_data&gt;
    &lt;qty&gt;50.0000&lt;/qty&gt;
    &lt;min_qty&gt;0.0000&lt;/min_qty&gt;
    &lt;use_config_min_qty&gt;1&lt;/use_config_min_qty&gt;
    &lt;is_qty_decimal&gt;0&lt;/is_qty_decimal&gt;
    &lt;backorders&gt;0&lt;/backorders&gt;
    &lt;use_config_backorders&gt;1&lt;/use_config_backorders&gt;
    &lt;min_sale_qty&gt;1.0000&lt;/min_sale_qty&gt;
    &lt;use_config_min_sale_qty&gt;1&lt;/use_config_min_sale_qty&gt;
    &lt;max_sale_qty&gt;0.0000&lt;/max_sale_qty&gt;
    &lt;use_config_max_sale_qty&gt;1&lt;/use_config_max_sale_qty&gt;
    &lt;is_in_stock&gt;1&lt;/is_in_stock&gt;
    &lt;notify_stock_qty&gt;&lt;/notify_stock_qty&gt;
    &lt;use_config_notify_stock_qty&gt;1&lt;/use_config_notify_stock_qty&gt;
    &lt;manage_stock&gt;0&lt;/manage_stock&gt;
    &lt;use_config_manage_stock&gt;1&lt;/use_config_manage_stock&gt;
    &lt;use_config_qty_increments&gt;1&lt;/use_config_qty_increments&gt;
    &lt;qty_increments&gt;0.0000&lt;/qty_increments&gt;
    &lt;use_config_enable_qty_inc&gt;1&lt;/use_config_enable_qty_inc&gt;
    &lt;enable_qty_increments&gt;0&lt;/enable_qty_increments&gt;
    &lt;is_decimal_divided&gt;0&lt;/is_decimal_divided&gt;
    &lt;use_config_enable_qty_increments&gt;1&lt;/use_config_enable_qty_increments&gt;
  &lt;/stock_data&gt;
&lt;/magento_api&gt;</pre>
		</div>
</div></div>
</div></div>

<p><b>Response Example: JSON</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">{"entity_id":"8","attribute_set_id":"4","type_id":"simple","sku":"dress","name":"Dress","url_key":"my-new-dress","country_of_manufacture":"AD","msrp_display_actual_price_type":"2","gift_message_available":"1","price":"2000.0000","weight":"0.5000","status":"1","visibility":"4","tax_class_id":"7","description":"dress","group_price":[{"website_id":"0","cust_group":"1","price":"1400.0000"}],"tier_price":[{"website_id":"0","cust_group":"1","price":"1300.0000","price_qty":"1.0000"}],"stock_data":{"qty":"50.0000","min_qty":"0.0000","use_config_min_qty":"1","is_qty_decimal":"0","backorders":"0","use_config_backorders":"1","min_sale_qty":"1.0000","use_config_min_sale_qty":"1","max_sale_qty":"0.0000","use_config_max_sale_qty":"1","is_in_stock":"1","notify_stock_qty":null,"use_config_notify_stock_qty":"1","manage_stock":"0","use_config_manage_stock":"1","use_config_qty_increments":"1","qty_increments":"0.0000","use_config_enable_qty_inc":"1","enable_qty_increments":"0","is_decimal_divided":"0","use_config_enable_qty_increments":"1"}}</pre>
		</div>
</div></div>
</div></div>



<p><b>Authentication</b>: Customer, Guest<br/>
<b>Default Format</b>: XML<br/>
<b>Parameters</b>:<br/>
<em>No Parameters</em></p>


<div class='panelMacro'><table class='infoMacro'><tr><td>GET <a href="http://magentohost/api/rest/products/8">http://magentohost/api/rest/products/8</a></td></tr></table></div>


<p><b>Response Example: XML</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">&lt;?xml version="1.0"?&gt;
&lt;magento_api&gt;
  &lt;entity_id&gt;1&lt;/entity_id&gt;
  &lt;type_id&gt;simple&lt;/type_id&gt;
  &lt;sku&gt;dress_test&lt;/sku&gt;
  &lt;name&gt;Wedding dress&lt;/name&gt;
  &lt;meta_title&gt;dress&lt;/meta_title&gt;
  &lt;meta_description&gt;A nice wedding dress&lt;/meta_description&gt;
  &lt;description&gt;White wedding dress&lt;/description&gt;
  &lt;short_description&gt;dress&lt;/short_description&gt;
  &lt;meta_keyword&gt;white, dress&lt;/meta_keyword&gt;
  &lt;tier_price/&gt;
  &lt;is_in_stock&gt;1&lt;/is_in_stock&gt;
  &lt;regular_price_with_tax&gt;1500&lt;/regular_price_with_tax&gt;
  &lt;regular_price_without_tax&gt;1500&lt;/regular_price_without_tax&gt;
  &lt;final_price_with_tax&gt;1000&lt;/final_price_with_tax&gt;
  &lt;final_price_without_tax&gt;1000&lt;/final_price_without_tax&gt;
  &lt;is_saleable&gt;1&lt;/is_saleable&gt;
  &lt;image_url&gt;http://magento/media/catalog/product/cache/0/image/9df78eab33525d08d6e5fb8d27136e95/1/2/wedding_dress.jpg&lt;/image_url&gt;
  &lt;url&gt;http://magento/index.php/catalog/product/view/id/1/s/dress/&lt;/url&gt;
  &lt;buy_now_url&gt;http://magento/index.php/checkout/cart/add/uenc/aHR0cDovLzEyNy4wLjAuMS9Tb3VyY2VzL2FwaS9yZXN0L3Byb2R1Y3RzLzE,/product/1/&lt;/buy_now_url&gt;
  &lt;total_reviews_count&gt;0&lt;/total_reviews_count&gt;
  &lt;has_custom_options&gt;&lt;/has_custom_options&gt;
&lt;/magento_api&gt;</pre>
		</div>
</div></div>
</div></div>

<p><b>Response Example: JSON</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">{"entity_id":"1","type_id":"simple","sku":"dress_test","name":"Wedding dress","meta_title":"dress","meta_description":"A nice wedding dress","description":"White wedding dress","short_description":"dress","meta_keyword":"white, dress","tier_price":[],"is_in_stock":"1","regular_price_with_tax":1500,"regular_price_without_tax":1500,"final_price_with_tax":1000,"final_price_without_tax":1000,"is_saleable":"1","image_url":"http:\/\/magento\/media\/catalog\/product\/cache\/0\/image\/9df78eab33525d08d6e5fb8d27136e95\/1\/2\/wedding_dress.jpg","url":"http:\/\/magento\/index.php\/catalog\/product\/view\/id\/1\/s\/dress\/","buy_now_url":"http:\/\/magento\/index.php\/checkout\/cart\/add\/uenc\/aHR0cDovLzEyNy4wLjAuMS9Tb3VyY2VzL2FwaS9yZXN0L3Byb2R1Y3RzLzE,\/product\/1\/","total_reviews_count":"0","has_custom_options":false}</pre>
		</div>
</div></div>
</div></div>


<h5><a name="RESTAPI-Resource-Products-HTTPMethod-PUT-products--id"></a>HTTP Method: PUT /products/:id</h5>

<p><b>描述</b>: Allows you to update an existing product.</p>


<p><b>Authentication</b>: Admin<br/>
<b>Default Format</b>: JSON<br/>
<b>Parameters</b>:<br/>
<em>Enter only those parameters which you want to update.</em></p>


<div class='panelMacro'><table class='infoMacro'><tr><td>PUT <a href="http://magentohost/api/rest/products/8">http://magentohost/api/rest/products/8</a><br/>
PUT for specific store <a href="http://magentohost/api/rest/products/8/store/3">http://magentohost/api/rest/products/8/store/3</a></td></tr></table></div>

<p><b>Request Example: JSON</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">{
"attribute_set_id":"4",
"type_id":"simple",
"sku":"wedding dress",
"name":"Dress_test",
"meta_title":"dress",
"meta_description":"a wedding dress",
"price":"2000.0000",
"weight":"0.5000",
"status":"1",
"visibility":"4",
"enable_googlecheckout":"1",
"tax_class_id":"7",
"description":"dress",
"meta_keyword":"dress, wedding"
}</pre>
		</div>
</div></div>
</div></div>


<p><b>Request Example: XML</b></p>

<div class="panel" style="border-width: 1px;"><div class="panelContent">
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">&lt;?xml version="1.0"?&gt;
&lt;magento_api&gt;
  &lt;attribute_set_id&gt;4&lt;/attribute_set_id&gt;
  &lt;type_id&gt;simple&lt;/type_id&gt;
  &lt;sku&gt;wedding dress&lt;/sku&gt;
  &lt;name&gt;Dress_test&lt;/name&gt;
  &lt;meta_title&gt;dress&lt;/meta_title&gt;
  &lt;price&gt;2000.0000&lt;/price&gt;
  &lt;weight&gt;0.5000&lt;/weight&gt;
  &lt;status&gt;1&lt;/status&gt;
  &lt;visibility&gt;4&lt;/visibility&gt;
  &lt;enable_googlecheckout&gt;1&lt;/enable_googlecheckout&gt;
  &lt;tax_class_id&gt;7&lt;/tax_class_id&gt;
  &lt;description&gt;dress&lt;/description&gt;
  &lt;meta_keyword&gt;dress, wedding&lt;/meta_keyword&gt;
&lt;/magento_api&gt;</pre>
		</div>
</div></div>
</div></div>



<h5><a name="RESTAPI-Resource-Products-HTTPMethod-DELETE-products--id"></a>HTTP Method: DELETE /products/:id</h5>

<p><b>描述</b>: Allows you to delete an existing product.</p>


<p><b>Authentication</b>: Admin<br/>
<b>Default Format</b>: JSON<br/>
<b>Parameters</b>: <em>no parameters</em><br/>
<b>Request Example</b>:</p>

<div class='panelMacro'><table class='infoMacro'><tr><td>DELETE <a href="http://magentohost/api/rest/products/1">http://magentohost/api/rest/products/1</a></td></tr></table></div>




<h4><a name="RESTAPI-Resource-Products-PossibleHTTPStatusCodes"></a>Possible HTTP Status Codes</h4>


<table><tbody>
<tr>
<th> Status Code </th>
<th> Message </th>
<th> Description </th>
</tr>
<tr>
<td> 404 </td>
<td> Resource not found. </td>
<td> The required resource is not found. </td>
</tr>
<tr>
<td> 405 </td>
<td> Resource method not implemented yet. </td>
<td> The required method is not implemented yet. </td>
</tr>
<tr>
<td> 405 </td>
<td> Resource does not support method. </td>
<td> The current resource does not support the specified method. </td>
</tr>
</tbody></table>



<?php include(__ROOT__ . 'footer.php'); ?>		    
